#include <sys/stat.h>
#include <fcntl.h>
#include "stdio.h"
#include <unistd.h>

int lcdfd;

int main()
{
    lcdfd = open("/dev/fb0",O_RDWR);
    if(lcdfd == -1)
    {
        perror("open /dev/fb0 error");
    }

    int red = 0x00ff0000;
    int green = 0x0000ff00;
    int blue = 0x000000ff;
    int yellow = 0x00ffff00;
    int white = 0x00ffffff;
    int black = 0x00000000;

    int i;
    for(i=0;i<800*160;i++)
    {
        write(lcdfd, &black, 4);
    }
    for(i=0;i<800*160;i++)
    {
        write(lcdfd, &yellow, 4);
    }
    for(i=0;i<800*160;i++)
    {
        write(lcdfd, &red, 4);
    }

    close(lcdfd);
}